t = int(input())
ll = 1*100000+1

dp = [0] * (ll)
cnt =[[0 for _ in range(2)] for _ in range((ll)) ]

cnt[1][0] = 1
cnt[2][1] = 1
MODE = int(1e9+7)
for i in range(3, ll):
    cnt[i][0] += cnt[i-1][0] + cnt[i-2][0]
    cnt[i][1] += cnt[i-1][1] + cnt[i-2][1]
    dp[i] += dp[i-1] + dp[i-2] + cnt[i-1][0] * cnt[i-2][1]
    dp[i] %= MODE
    cnt[i][0] %= MODE
    cnt[i][1] %= MODE

for _ in range(t):
    print(dp[int(input())])